const map = {
    state: {
        SceneMode: true,//ue场景和cesium模式切换
        basin: 'WDC2100129000001',
        basinShow: true,
        level: 5000,
        mapLoadingText: [],
        mapLoadingTextStep: '',
        basinArry: {
            'WDC2100129000001': {
                lon: 114.591809,
                lat: 24.484856,
                h: 50000,
                r: 0,
                b3dmBasin: [
                    'rWhuxwTl',
                    'X2O3mydD',
                    '7Fxhu4D1',
                    'z1X1qttT',
                    'W7Q9Lop0',
                    'HnkugIeZ',
                    'wOHqIOiL',
                    'AfGvwkf5',
                    '2USnzzo0',
                    '4Z5CUJ7G',
                    'uDifxeMc',
                    'nJF9oG5B',
                    'KAbHYnek',
                    'LuRvfnrl',
                    'W4Bj7oRT',
                    'vq75tevD'
                ],
            },
            'WDC2100129000006': {
                lon: 114.188117,
                lat: 24.30356433,
                h: 45000,
                r: 0,
                b3dmBasin: [
                    '45YuoK8x',
                    '8nYgFIb9',
                    '6jNxbwQV',
                    'SGSLZRVv',
                    '316IyHDU',
                ],
            }
        },
        basinlist: [
            {
                'wswscd': 'WDC2100129000001',
                'wsnm': '大席水',
                'wsarea': '309.81',
                'rvlen': '29.19',
                'maxlen': '36.06',
                'mdcd': 'SX00D005',
                'top': '-65px',
                'left': '128px',
            },
            {
                'wswscd': 'WDC2100129000006',
                'wsnm': '龙仙水',
                'wsarea': '309.81',
                'rvlen': '29.19',
                'maxlen': '36.06',
                'mdcd': 'SX00D005',
                'top': '-120px',
                'left': '70px',
            },
        ],
    },
    mutations: {
        SCENEMODE: (state, SceneMode) => {
            state.SceneMode = SceneMode
        },
        BASIN: (state, basin) => {
            console.log(basin)
            state.basin = basin
        },
        BASINSHOW: (state, basinShow) => {
            state.basinShow = basinShow
        },
        LEVEL: (state, level) => {
            state.level = level
        },
        MAPLOADINGTEXT: (state, mapLoadingText) => {
            state.mapLoadingText = mapLoadingText
        },
        mapLoadingPush: (state, mapLoadingText) => {
            state.mapLoadingText.push(mapLoadingText)
        },
        mapLoadingDel: (state, mapLoadingText) => {
            var find = state.mapLoadingText.findIndex(item => {
                return item === mapLoadingText
            })
            if (find !== -1) {
                state.mapLoadingText.splice(find, find + 1)
            }
        },
        MAPLOADINGTEXTSTEP: (state, mapLoadingTextStep) => {
            state.mapLoadingTextStep = mapLoadingTextStep
        }
    },
    actions: {
        SceneMode: ({ commit }, SceneMode) => {
            commit('SCENEMODE', SceneMode)
        },
        basin: ({ commit }, basin) => {
            commit('BASIN', basin)
        },
        basinShow: ({ commit }, basinShow) => {
            commit('BASINSHOW', basinShow)
        },

        level: ({ commit }, level) => {
            commit('LEVEL', level)
        },
        mapLoadingText: ({ commit }, mapLoadingText) => {
            commit('MAPLOADINGTEXT', mapLoadingText)
        },
        mapLoadingTextStep: ({ commit }, mapLoadingTextStep) => {
            commit('MAPLOADINGTEXTSTEP', mapLoadingTextStep)
        }
    }
}

export default map
